package com.tedu._01mvcboot01.controller;

import com.tedu._01mvcboot01.pojo.dto.UserRegDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {
    @RequestMapping("v1/user/login")
    @ResponseBody
    public String login(String username,String password){
        return "感谢您，登录成功！"+username+" 密码"+password;
    }
    @RequestMapping("v1/user/reg")
    @ResponseBody
    public String reg(UserRegDTO userRegDTO){
        String username = userRegDTO.getUsername();
        return "感谢您，注册成功！"+username;
    }
}
